package com.lee.shiro.service;

import org.apache.shiro.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * 行内按钮权限控制
 * 
 * @author LiPengFei
 *
 */
@Component
public class PermissionService {
	public String hasPermi(String permission) {
		if (SecurityUtils.getSubject().isPermitted(permission)) {
			return "";
		} else {
			return "hidden";
		}
	}
}